<?php if (!empty($xml_prolog)) {
    print $xml_prolog;
} ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language ?>" lang="<?php print $language->language ?>" dir="<?php print $language->dir ?>">
	
<head>
    <?php print $head ?>
    <title>
        <?php print $head_title; ?>
    </title>
    <?php print $styles ?>
	
    <?php print $scripts ?>
	

</head>

<body class="<?php print $body_classes; ?>">
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-3511693-1']);
  _gaq.push(['_setDomainName', 'parvis.ch']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
<?php if (!empty($fontsize_init)) {
    print $fontsize_init;
} ?>

<div class="page_margins">
    <div class="page">

        <div id="header" class="clearfix">
            <div id="bg_image">
                <?php
                global $language;
				
                if (is_array($node->field_theme)) {

                    $imgIndex = $node->field_theme['0']['value'];
                    $imgName = 'banner_' . sprintf("%02d", $imgIndex) . '_' . $language->language . '.jpg';
                    $img = '<img src="'. path_to_theme().'/header_images/' . $imgName . '" alt="banner"></img>';

                } else {
                    $img = '<img src="/'. path_to_theme().'/header_images/banner_00_' . $language->language . '.jpg" alt="banner"></img>';
                }
                print '<a href="/' . $language->language . '">' . $img . '</a>';
                ?>

            </div>
            <div id="topnav">
				<?php print $header; ?>
            </div>
            

            <?php //print $search_box ?>
            

        </div>

        <!-- begin: main navigation #nav -->
        <div id="nav">
            <?php if (!empty($primary_links)) { ?>
            <div class="hlist">
                <?php print theme('links', $primary_links, array('class' => 'primary-links')) ?>
				<div id="lang">
					<?php print $lang ?>
				</div>
                <?php print $menu_right ?>
            </div>
            <?php } ?>
        </div>
        <!-- end: main navigation -->

        <!-- begin: main content area #main -->
        <div id="main">


            <?php if ($mission) { ?>
            <!-- #mission: between main navigation and content -->
            <div id="mission" class="clearfix">
                <?php print $mission ?>
            </div>
            <?php } ?>

            <?php

            if (is_array($node->field_layout)) {
                $page_layout = $node->field_layout['0']['value'];
            } else {
                $page_layout = '0';
            }

            ?>
			
			
			
            <!-- begin: #col1 - first float column -->
            <div id="col1">
                <div id="col1_content" class="clearfix">
                    <div id="col1_inside" class="floatbox">
                        <?php print $left ?>

                        <?php if ($left_system): ?>

                        <div class="box system_menu">
                            <h3>Menu Système</h3>

                            <div class=""><?php print $left_system ?></div>
                        </div>
                        <?php endif; ?>


                    </div>
                </div>
            </div>
            <!-- end: #col1 -->

            <!-- begin: #col2 second float column -->
            <?php if (!$page_layout == '1') { ?>

            <div id="col2">
                <div id="col2_content" class="clearfix">
                    <div id="col2_inside" class="floatbox">
                        <?php print $right ?>
                    </div>
                </div>
            </div>
            <?php } ?>


            <!-- begin: #col3 static column -->
            <div id="col3"  <?php if ($page_layout == '1'): ?>
                 style="margin-left: 200px; margin-right: 20px"
                <?php endif; ?>
                    >
                <div id="col3_content" class="clearfix">
                    <div id="col3_inside" class="floatbox">
					<?php if ($tabs) { ?>
					<div class="tabs"><ul><?php print $tabs ?></ul></div>
				<?php } ?>
						<?php
							$hideTitle = false;
							if (is_array($node->field_hide_title)) {
								$hideTitle = ($node->field_hide_title[0]['value'] == '1') ? true : false;
							}
						?>
						<!--<?php if(!$hideTitle): ?><div class="breadcrumb"><?php print phptemplate_breadcrumb($node);?></div><?php endif;?>-->

                        <?php if ($show_messages && $messages): print $messages; endif; ?>
                        <?php

                        if (!empty($title) && !$hideTitle) {
                            ?><h1 class="title"><?php print t($title); ?></h1><?php
                        }
                        ?>
                        <?php
                        if (!empty($node->field_subtitle[0]['value'])) {
                            echo '<h2>' . $node->field_subtitle[0]['value'] . '</h2>';
                        }

                        if (!empty($node->field_subtitle_book[0]['value'])) {
                            echo '<h2>' . $node->field_subtitle_book[0]['value'] . '</h2>';
                        }
                        ?>

                        <?php print $help ?>
                        <?php print $above_content ?>

                        <?php print $content ?>
						
                        <?php print $feed_icons ?>
                    </div>
					  <?php 
						if(!$is_front){
							//print get_link_back($node);
						}
					  ?>
                </div>
                <div id="ie_clearing">&nbsp;</div>
                <!-- end: IE Column Clearing -->
            </div>
            <!-- end: #col3 -->

        </div>
        <!-- end: #main -->

        <!-- begin: #footer -->
        <div id="footer">
            <?php print $footer ?>
        </div>
        <!-- end: #footer -->

    </div>
    

</div>

<?php print $closure ?>
</body>
</html>
